package xyz.zq.cloud.common.security.annotation;

import org.springframework.context.annotation.Import;
import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity;
import org.springframework.security.oauth2.config.annotation.web.configuration.EnableResourceServer;
import xyz.zq.cloud.common.security.component.CloudResourceServerAutoConfiguration;
import xyz.zq.cloud.common.security.component.CloudSecurityBeanDefinitionRegistrar;

import java.lang.annotation.*;

/**
 * 资源服务注解
 *
 * @author hzq
 * @date 2020/4/28 21:03
 */
@Documented
@Inherited
@EnableResourceServer
@Target({ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
@EnableGlobalMethodSecurity(prePostEnabled = true)
@Import({CloudResourceServerAutoConfiguration.class, CloudSecurityBeanDefinitionRegistrar.class})
public @interface EnableCloudResourceServer {

}
